# -*- coding: utf-8 -*-
"""
****************************
@Time    : 2021/5/6 15:46
@Author  : Candy
@File    : img2base64.py
****************************
"""
import base64


def change2base64():
    with open('./../static/doc/img/img_1.png', 'rb') as f:
        content = f.read()
        res = base64.b64encode(content)
        print(res.decode())
        print(len(res.decode()))


change2base64()
